x86emul: fully ignore segment override for register-only operations
authorJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2015 12:45:51 +0000 (13:45 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Mar 2015 12:45:51 +0000 (13:45 +0100)
commitbcf92a5382b75fd964c1f8678b2d9a3abe6dec39
tree86610c389cd4083cd964ce95ff359c0334b84d6a
parent77618649c65d3851c4af9e306ed770137e31dfcb
x86emul: fully ignore segment override for register-only operations

For ModRM encoded instructions with register operands we must not
overwrite ea.mem.seg (if a - bogus in that case - segment override was
present) as it aliases with ea.reg.

This is CVE-2015-2151 / XSA-123.

Reported-by: Felix Wilhelm <fwilhelm@ernw.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Reviewed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/x86_emulate/x86_emulate.c